﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace NHINDirect
{
    public enum ProtocolError
    {
        Unexpected = 0,
        InvalidCRLF,
        InvalidMimeEntity,
        InvalidHeader,
        InvalidBody,
        InvalidBodySubpart,
        InvalidAddress,
        MissingTo,
        MissingFrom,
        MissingNameValueSeparator,
        MissingHeaderValue,
        ContentTypeMismatch,
        TransferEncodingMismatch,
        Base64EncodingRequired,
        InvalidSignatureMimeParts
    }
    
    public class ProtocolException : NHINDException<ProtocolError>
    {
        public ProtocolException(ProtocolError error)
            : base(error)
        {
        }
        
        public ProtocolException(ProtocolError error, string message)
            : base(error, message)
        {
        }
        
    }

    public class SignatureValidationException : CryptographicException
    {
        public SignatureValidationException()
        {
        }
    }
}
